package com.imay.live.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.imay.live.model.PermissionRuleModel;
import com.imay.live.R;

import java.util.List;

/**
 * Created by  nick on 2017/5/11 0011.
 */

public class PermissionRuleAdapter extends BaseQuickAdapter<PermissionRuleModel,BaseViewHolder> {

    public PermissionRuleAdapter(List<PermissionRuleModel> data) {
        super(R.layout.item_permission_experience,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PermissionRuleModel item) {
        helper.setText(R.id.tv_level_rule,String.format(mContext.getString(R.string.permission_rule_level),item.getLevel()));
        helper.setText(R.id.tv_user_experience_rule,item.getUserExp()+"");
        helper.setText(R.id.tv_live_experience_rule,item.getLiveExp()+"");
    }
}
